home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d21
/
dvglue.arc
/
TVQTITLE.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-01-09
|
1KB
|
40 lines
/*=======================================================*/
/* TVQTITLE.C */
/* */
/* (c) Copyright 1988 Ralf Brown All Rights Reserved */
/* May be freely copied for noncommercial use, so long */
/* as this copyright notice remains intact, and any */
/* changes are marked in the comment blocks preceding */
/* functions. */
/*=======================================================*/
#include <string.h>
#include "tvapi.h"
#include "tvstream.h"
/*=======================================================*/
/* TVqry_title--get window's title */
/* Ralf Brown 4/3/88 */
/*=======================================================*/
void pascal TVqry_title(OBJECT win,char *title,int size)
{
BYTE *query_stream = (BYTE *) malloc(size+6) ;
if (query_stream)
{
size-- ;
query_stream[0] = 0x1B ;
query_stream[1] = 0x01 ;
*((int *)(query_stream+2)) = size + 2 ;
query_stream[4] = 0xEF ;
query_stream[5] = size ;
TVwin_stream(win,query_stream) ;
strncpy(title,(char *)query_stream+6,size) ;
title[size] = '\0' ;
free(query_stream) ;
}
}
/* End of TVQTITLE.C */